<template>
    <view :style="themeColor">
        <view class="page" >
    <view class="flex benben-position-layout flex flex-wrap align-center refundList_flex_0"    :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
            <view   class='flex flex-wrap align-center justify-between flex-sub refundList_fd0_0'      >
            <view   class='flex flex-wrap align-center refundList_fd0_0_c0'   @tap.stop="handleJumpDiy" data-type="back" data-url="1"   >
        <text class='fu-iconfont2  refundList_fd0_0_c0_c0'    >&#xE794;</text>
</view>
    <view   class='flex flex-wrap align-stretch justify-center'      >
        <text class='refundList_fd0_0_c1_c0'  >{{$t('退款/售后')}}</text>
</view>
    <view   class='flex flex-wrap align-center justify-end refundList_fd0_0_c0'      >
        </view>
</view>

        </view>
<view :style="{height: (88+StatusBarRpx)+'rpx'}"  ></view>
<!---flex布局flex布局开始-->
 <view class="flex flex-direction align-stretch benben-flex-layout"    >
            <template v-for = '(item,key0) in dataList'>
    <view   class='flex flex-direction align-stretch refundList_fd1_0'   @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/newShop/detailsRefund/detailsRefund?id=${item.aid}`"    :key='key0'>
            <view   class='flex align-center justify-end'      >
            <view   class='flex align-center'      >
        <text class='refundList_fd1_0_c0_c0_c0'    v-if= " item.refund_type=='1'"  >{{item.refund_type_title}}</text>
    <view   class='flex flex-wrap align-center refundList_fd1_0_c0_c0_c1'    v-if= " item.refund_type=='1' || item.refund_type=='2'"  >
        <text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status==0"  >{{$t('待审核')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='1' && item.express_no==''"  >{{$t('待寄回')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='2'"  >{{$t('待退款')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='3'"  >{{$t('商家已收货')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='4'"  >{{$t('售后已完成')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status<0"  >{{$t('售后关闭')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='1' && item.express_no!=''"  >{{$t('待退款')}}</text>
</view>
    <view   class='flex flex-wrap align-center refundList_fd1_0_c0_c0_c1'    v-if= " item.refund_type=='3'"  >
        <text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status==0"  >{{$t('待审核')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='1' && item.express_no==''"  >{{$t('待寄回')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='1' && item.express_no!='待收货'"  >{{$t('待审核')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='2'"  >{{$t('待发货')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='4'"  >{{$t('已发货')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status=='5'"  >{{$t('售后完成')}}</text><text class='refundList_fd1_0_c0_c0_c1_c0'    v-if= " item.status<0"  >{{$t('售后关闭')}}</text>
</view>
</view>
</view>
    <view   class='flex align-stretch refundList_fd1_0_c1'      >
        <image class='refundList_fd1_0_c1_c0'  mode="aspectFill"  :src='item.goods_thumb'></image>
    <view   class='flex flex-direction align-stretch flex-sub refundList_fd1_0_c1_c1'      >
        <text class='refundList_fd1_0_c1_c1_c0'  >{{item.goods_name}}</text>
<text class='refundList_fd1_0_c1_c1_c1'  >{{item.sku_name}}</text>
    <view   class='flex align-end'      >
        <text class='refundList_fd1_0_c1_c1_c2_c0'  >{{$t('¥')}}</text>
<text class=' refundList_fd1_0_c1_c1_c2_c1'   >
    <text class=' refundList_price1_fd1_0_c1_c1_c2_c1' >{{ item.shop_price | frontPrice }}</text>
    <text class=' refundList_price2_fd1_0_c1_c1_c2_c1' >{{ item.shop_price | laterPrice }}</text>
</text>
<text class='refundList_fd1_0_c1_c1_c2_c2'  >x</text>
<text class='refundList_fd1_0_c1_c1_c2_c3'  >{{item.num}}</text>
</view>
</view>
</view>
    <view   class='flex flex-wrap align-center justify-end refundList_fd1_0_c2'      >
        <button class='refundList_fd1_0_c2_c0'  @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/newShop/detailsRefund/detailsRefund?id=${item.aid}`"  >{{$t('查看详情')}}</button><button class='refundList_fd1_0_c2_c0_1'  @tap.stop="getRefundDeleteIDFunc(item.aid)" v-if= " item.status=='4' || item.status<0" >{{$t('删除订单')}}</button><button class='refundList_fd1_0_c2_c0_1'  @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/newShop/refundLogisticsCheck/refundLogisticsCheck?order_id=${item.aid}`" v-if= " item.status>1" >{{$t('查看物流')}}</button>
</view>
</view>
    </template>
    <fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
</view>
        
<!---flex布局flex布局结束-->
<benben-popup v-model="popupShow1701398527969" :mask="true" :mask-close-able="true"  mode='center' :z-index='999'>
    <!---删除订单flex布局开始-->
 <view class="flex benben-flex-layout flex-wrap align-center"    >
            <view   class='flex flex-direction flex-wrap align-center refundList_fd2_0'      >
        <text class='refundList_fd2_0_c0'  >{{$t('提示')}}</text>
<text class='refundList_fd2_0_c1'  >{{$t('确定删除订单？')}}</text>
    <view   class='flex align-center refundList_fd2_0_c2'      >
        <button class='refundList_fd2_0_c2_c0'  @tap.stop="popupShow1701398527969=false"  >{{$t('取消')}}</button>
<button class='refundList_fd2_0_c2_c1'  @tap.stop="AfterSalesDeleteFunc()"  >{{$t('确定')}}</button>
</view>
</view>
</view>
        
<!---删除订单flex布局结束-->
    
</benben-popup>
    
    
        </view>
    </view>
</template>
<script>
    import pagingList from '@/common/mixin/paging_list.js';
import {validate} from '@/common/utils/validate.js'
    
    export default {
        components:{},
        mixins: [pagingList],
        
        data(){
			return {"popupShow1701398527969":false,"minixPagingListsApi":"","pageingListApiMethod":"","allowOnloadGetList":false,"dataList":[],"RefundDeleteID":"","order_goods_id":""};
		},
		computed:{
            themeColor() {
              return this.$store.getters.themeColor
            },
            
		},
		watch:{},
		onLoad(options){
            let {order_goods_id}=options
if (order_goods_id !== undefined) this.order_goods_id = order_goods_id
this.getAfterListFunc()
this.diyPageListen()
		},
        onUnload() {
            this.diyOffPageListen()    
        },
		onReady(){
            
		},
		onShow(){
            
		},
		onHide(){
            
		},
		onResize(){
            
		},
		onPullDownRefresh(){
            this.getAfterListFunc()
		},
		onReachBottom(e){
            
		},
		onPageScroll(e){
            
		},
		methods:{
                            //获取售后列表
                 getAfterListFunc(){
                                    this.minixPagingListsApi = global.apiUrls.post6427d125edfc5;
                this.pageingListApiMethod = 'post';
                this.allowOnloadGetList = false;
                this.pagingListPostDataContent = {order_goods_id:this.order_goods_id}
                this.listData = [];
                this.dataList = this.listData;
                this.pagingListToggle();
                
                },
                //获取售后订单id
                 getRefundDeleteIDFunc(id){
                       this.RefundDeleteID = id;
    this.popupShow1701398527969 = true;
                },
                //售后删除
                async AfterSalesDeleteFunc(){
                        //请求方法
    //数据验证
    
  let data6427dbbacba58 = await this.$api.dbPost(global.apiUrls.post6427dbbacba58, {
    id:this.RefundDeleteID
  });
  if(!data6427dbbacba58) return
  if (data6427dbbacba58.data.code != 1) {
    this.$message.info(data6427dbbacba58.data.msg);
    return
  } 
  
  
  
    this.popupShow1701398527969 = false;
                setTimeout(()=>{
                            this.$message.info('删除成功');
      },300)
                    this.getAfterListFunc()
                },
                pagingListPostData(){
                    return this.pagingListPostDataContent
                },
    //页面监听
    diyPageListen() {
                  uni.$on('shenqingchenggss',(data) => {
                                   this.getAfterListFunc()
          });
    }                     ,
    //注销页面监听
    diyOffPageListen() {
                     uni.$off('shenqingchenggss');
    }                     
		}
    };
</script> 
<style lang="scss" scoped>
           .page{
            width: 100vw;
            overflow-x: hidden;
            min-height: calc(100vh - var(--window-bottom));
            background:#F8F8F8;background-size: 100% auto;
        }
    .refundList_flex_0{
        background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
    }
    .refundList_fd0_0_c1_c0{
        font-size:36rpx;font-weight:700;color:#333;line-height:88rpx;
    }
    .refundList_fd0_0_c0_c0{
        font-size:36rpx;color:#333;
    }
    .refundList_fd0_0_c0{
        width:120rpx;height:88rpx;
    }
    .refundList_fd0_0{
        padding:0rpx 32rpx 0rpx 32rpx;height:88rpx;
    }
    .refundList_fd1_0_c2_c0_1{
        background:rgba(246, 247, 249, 1);border-radius:33rpx 33rpx 33rpx 33rpx;width:144rpx;line-height:56rpx;font-size:24rpx;color:var(--benbenFontColor0);margin:24rpx 0rpx 0rpx auto;
    }
    .refundList_fd1_0_c2_c0{
        background:rgba(246, 247, 249, 1);border-radius:33rpx 33rpx 33rpx 33rpx;width:144rpx;line-height:56rpx;font-size:24rpx;color:var(--benbenFontColor0);margin:24rpx 0rpx 0rpx 24rpx;
    }
    .refundList_fd1_0_c2{
        margin:24rpx 0rpx 0rpx 0rpx;
    }
    .refundList_fd1_0_c1_c1_c2_c3{
        color:var(--benbenFontColor2);font-size:24rpx;
    }
    .refundList_fd1_0_c1_c1_c2_c2{
        margin:0rpx 0rpx 0rpx auto;color:var(--benbenFontColor2);font-size:24rpx;
    }
    .refundList_price2_fd1_0_c1_c1_c2_c1{
        font-size:28rpx;
    }
    .refundList_price1_fd1_0_c1_c1_c2_c1{
        font-size:32rpx;
    }
    .refundList_fd1_0_c1_c1_c2_c1{
        color:var(--benbenFontColor0);font-weight:700;font-size:32rpx;
    }
    .refundList_fd1_0_c1_c1_c2_c0{
        color:var(--benbenFontColor0);font-size:24rpx;
    }
    .refundList_fd1_0_c1_c1_c1{
        margin:16rpx 0rpx 30rpx 0rpx;color:var(--benbenFontColor2);font-size:24rpx;
    }
    .refundList_fd1_0_c1_c1_c0{
        -webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;color:var(--benbenFontColor0);font-size:28rpx;font-weight:600;
    }
    .refundList_fd1_0_c1_c1{
        margin:0rpx 0rpx 0rpx 24rpx;
    }
    .refundList_fd1_0_c1_c0{
        width:200rpx;height:200rpx;border-radius:0rpx 0rpx 0rpx 0rpx;
    }
    .refundList_fd1_0_c1{
        border-bottom:1px solid #eee;margin:24rpx 0rpx 0rpx 0rpx;padding:0rpx 0rpx 32rpx 0rpx;
    }
    .refundList_fd1_0_c0_c0_c1_c0{
        color:var(--benbenFontColor4);font-size:28rpx;font-weight:700;
    }
    .refundList_fd1_0_c0_c0_c1{
        margin:0rpx 0rpx 0rpx 12rpx;
    }
    .refundList_fd1_0_c0_c0_c0{
        border:1px solid var(--benbenbdColor2);background:#F2F9FF;color:var(--benbenFontColor4);font-size:24rpx;padding:0rpx 10rpx 0rpx 11rpx;background-size:100% auto;border-radius:40rpx 40rpx 0rpx 40rpx;
    }
    .refundList_fd1_0{
        background:rgba(255, 255, 255, 1);margin:24rpx 24rpx 0rpx 24rpx;border-radius:16rpx;background-size:100% auto;padding:38rpx 24rpx 32rpx 24rpx;
    }
    .refundList_fd2_0_c2_c1{
        background:var(--benbenbgColor1);font-size:32rpx;color:var(--benbenFontColor5);width:270rpx;height:101rpx;line-height:101rpx;font-weight:500;
    }
    .refundList_fd2_0_c2_c0{
        border-right:1px solid #eee;background:#fff;font-size:32rpx;color:rgba(153, 153, 153, 1);width:270rpx;height:101rpx;line-height:101rpx;font-weight:400;
    }
    .refundList_fd2_0_c2{
        border-top:1px solid #eee;margin:51rpx 0rpx 0rpx 0rpx;
    }
    .refundList_fd2_0_c1{
        line-height:44rpx;font-size:32rpx;font-weight:500;color:#333333;text-align:center;margin:32rpx 40rpx 0rpx 40rpx;
    }
    .refundList_fd2_0_c0{
        line-height:44rpx;font-size:36rpx;font-weight:700;color:#333333;margin:40rpx 0rpx 0rpx 0rpx;
    }
    .refundList_fd2_0{
        background:#fff;width:540rpx;background-size:100% auto !important;border-radius:16rpx 16rpx 16rpx 16rpx;
    }
</style>